package com.itheima.object2;

public class Student {
    //属性:有什么, private:成员变量私有化,被private修饰的成员变量只能在当前类中被访问
    private String name;
    private int age;

    //设置set和get方法
    public void setAge(int age){
        this.age = age;
    }
    public int getAge(){
        return this.age;
    }
    public void setName(String name){
        this.name = name;

    }
    public String getName(){
        return name;
    }
    public void show(){
        System.out.println(this.name+"..." +
                this.age);
    }

    public Student(){
        System.out.println("我是无参构造!");

    }

}
